fix: gracefully handle invalid json response#8104
fix: gracefully handle invalid json response#8104pschiel wants to merge 1 commit intoanomalyco:devfrom
Conversation
|
The following comment was made by an LLM, it may be inaccurate: Found potential duplicate PRs: Related PRs (addressing similar/same issue):
Why they're related: PR #8104 fixes JSON parsing errors on empty responses from aborted requests. PRs #8027 and #7888 appear to address the exact same issue (empty JSON responses), while #7959 and #7939 address related abort scenarios that can produce invalid responses. |
|
@pschiel this will be fixed upstream hey-api/openapi-ts#3202 |
When ?? I can't use opencode due to this |
NOW!! |
Fixes #7889
Cause:
Aborting requests (e.g., pressing ESC during streaming responses) can result in an empty response body.
The SDK client's JSON parser fails on empty strings with "Unexpected end of JSON input" because there was no error handling.
Fix: add error handling.